    /********************************************************/
    /*                                                      */
    /*                                                      */
    /*         Copyright (C), 1993  SEIKO EPSON Corp.       */
    /*         ALL RIGHTS RESERVED                          */
    /*                                                      */
    /*                                                      */
    /*  file name : fflush.c                                */
    /*                                                      */
    /*  Revision history                                    */
    /*      93/12/17    first release       S.Akaiwa        */
    /*      97/3/17	modified	    T.Katahira	    */
    /*			change function declaration	    */
    /*					to the ANSI style   */
    /*                                                      */
    /********************************************************/

#ifdef      UNIX
#include    "stdio.h"
#include    "smcvals.h"
#else
#include    <stdio.h>
#include    <smcvals.h>
#include	<_mj_os.h>
#endif

int
fflush(FILE * fiStrmP)

    /********************************************************/
    /*                                                      */
    /*  This is dummy function.                             */
    /*  If stdin, stdout or stderr is not specified by      */
    /*  fiStrmP, the fflush function returns EOF.           */
    /*  If successful, effect of the ungetc function is     */
    /*  cleared for same stream.                            */
    /*                                                      */
    /*      RETURN  0   ... Success                         */
    /*              EOF ... Error                           */
    /*                                                      */
    /*  <ANSI>                                              */
    /*      The fflush function flushes data in the stream  */
    /*      buffer.                                         */
    /*                                                      */
    /*      RETURN  0   ... Success                         */
    /*              EOF ... Error                           */
    /*                                                      */
    /********************************************************/

    /* FILE    *fiStrmP    ;       pointer to target stream */
{
     if(_ISSTDIO(fiStrmP)){                 /* stream stdio */
        fiStrmP->_flg = (short)_UGETN;/* clear ungetc efect */
        return  (int)0;                    /* normal return */
     }
     else {                                        /* other */
		 return FileFlush(fiStrmP->_fd);
     }
}
